<?php 
// Make sure someone is always logged in
if ($_SESSION['user'] == null || $_SESSION['user'] == "")
	header("Location: index.php"); // go back to login page
?>

<ul class="navbar">
  <li>Logged in as <?php echo $_SESSION['user'] ?></li> <br>
  <li><a href="search.php"><img src="SearchButton.png" /></a>
  <li><a href="messagebox.php"><img src="MessageButton.png" /></a>
  <li><a href="submit.php"><img src="PostButton.png" /></a>
  <li><a href="my_ads.php"><img src="MyAdsButton.png" /></a>
  <li><a href="logout.php"><img src="LogoutButton.png" /></a>
</ul>